import Vue from 'vue'
import App from './App.vue'
import router from '@/router'
// 引入mockServer.js文件,使其执行一次
import './mock/mockServer'
// 引入NavHeader头部面包屑组件
import NavHeader from '@/components/NavHeader'
import MyButton from '@/components/MyButton'
// 全局注册NavHeader
Vue.component('NavHeader', NavHeader)
Vue.component('MyButton', MyButton)

// 按需引入elements
import './plugins/elements'
//滚动条
import infiniteScroll from "vue-infinite-scroll";

// 声明使用插件
Vue.use(infiniteScroll);

Vue.config.productionTip = false

new Vue({
  beforeCreate () {
    // this就是Vue的实例对象
    Vue.prototype.$bus = this
  },
  render: h => h(App),
  router
}).$mount('#app')
